package com.example.landlord.demo.utils.system;

enum PuckerStatus{
    READY,//准备打出的牌，需要系统验证是否合法
    NOTSEND,//未打出的牌
    SENDED,//已打出的牌
    DIPAI//底牌
}

public class Puker{
    String pName;
    short value;
    int id;
    short color;
    PuckerStatus status = PuckerStatus.NOTSEND;

    public String getStates(){
        switch (status){
            case NOTSEND:
                return "未打出状态";
            case SENDED:
                return "已打出状态";
            case DIPAI:
                return "底牌";
            case READY:
                return "准备状态";
        }
        return null;
    }

    public void setStatus(PuckerStatus status){
        this.status=status;
    }

    public PuckerStatus getStatus(){
        return this.status;
    }

    public String getpName() {
        return pName;
    }

    public void setpName(String pName) {
        this.pName = pName;
    }

    public short getV() {
        return value;
    }

    public void setV(short v) {
        this.value = v;
    }

    public int getId() {
        return id;
    }

    public void setId(short id) {
        this.id = id;
    }

    public short getColor() {
        return color;
    }

    public String getColorName(){
        switch (this.color){
            case 0:
                return "♠";
            case 1:
                return "♥";
            case 2:
                return "♣";
            case 3:
                return "♦";
        }
        return null;
    }

    public void setColor(short color) {
        this.color = color;
    }

    @Override
    public String toString() {
        return "Puker{" +
                "pName='" + pName + '\'' +
                ", value=" + value +
                ", id=" + id +
                ", color=" + getColorName() +
                '}';
    }
}//扑克对象